package cn.lyz.authority.system.controller;

import cn.lyz.authority.common.vo.LyzResponseBody;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/api")
public class SystemController {

    @GetMapping("index")
    public LyzResponseBody<?> index(Integer requiredLogin){
        Map<String,Object> data = new HashMap<>();
        Map<String,Object> site = new HashMap<>();
        site.put("siteName","LYZ");
        site.put("recordNumber","渝ICP备2020013067号-2");
        site.put("version","v1.0.0");
        site.put("cdnUrl","demo.buildadmin.com");
        data.put("site",site);
        data.put("openMemberCenter",true);
        data.put("userInfo",new ArrayList<>());
        ArrayList<Object> rules = new ArrayList<>();
        data.put("rules",rules);
        data.put("menus",new ArrayList<>());
        return LyzResponseBody.success(data);
    }
}
